import 'package:flutter/material.dart';
import 'package:plant_app/constants.dart';
import 'image_and_icons.dart';
import 'title_and_price.dart';

class Body extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    Size size = MediaQuery.of(context).size;
    return Column(
      children: [
        Expanded(
          child: SingleChildScrollView(
            scrollDirection: Axis.vertical,
            child: Column(
              children: [
                ImageAndIcons(size: size),
                TitleAndPrice(title: "Angelica", country: "Russia", price: 440),
                SizedBox(height: kDefaultPadding),
              ],
            ),
          ),
        ),
        Container(
          child: Row(
            children: [
              Expanded(
                flex: 1,
                child: FlatButton(
                  height: 50,
                  shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.only(
                      topRight: Radius.circular(20),
                    ),
                  ),
                  color: kPrimaryColor,
                  onPressed: () {},
                  child: Column(
                    children: [
                      Text(
                        "Buy now",
                        style: TextStyle(color: Colors.white, fontSize: 16),
                      ),
                    ],
                  ),
                ),
              ),
              Expanded(
                flex: 1,
                child: FlatButton(
                  height: 50,
                  onPressed: () {},
                  child: Text("Description"),
                ),
              ),
            ],
          ),
        ),
      ],
    );
  }
}
